function gup( name ) {
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

function getProjectName() {
	return gup('project');
}

function ir(url) {
	window.location = url;
}

function checkProjectName() {
	var project = getProjectName();
	if (project == null || project.length	<= 0 ) {
		window.location = '/projects.html';
	}
}

function setPropertyGridValue(propGrid, name, value) {
	var sourcePG = propGrid.getSource();
	sourcePG[name] = value;
	propGrid.setSource(sourcePG);
}